package com.cjb.cloudfabric.service;

import com.cjb.cloudfabric.entity.BasicAsset;
import com.cjb.cloudfabric.entity.DeviceStatus;
import com.cjb.cloudfabric.entity.FabricUser;

import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;

/**
 * @Author chenjinbin
 * @Package IntelliJ IDEA
 * @Class OperateFabricService
 * @Date 2023-11-01 下午11:04
 */
public interface OperateFabricService {
    /**
     *
     * 查看全部资产列表
     * @Author chenjinbin
     * @Value
     * @Title
     */
    String QueryAllAsset() throws Exception;


    String SubmitAllAsset(BasicAsset basicAsset) throws Exception;

    /**
     * 硬件设备 数据上链接口补充
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    String SubmitDeviceData(DeviceStatus deviceStatus) throws Exception;

    /*通过AssetId获取资产 这个很重要*/
    String QueryAssetById(String assetId) throws Exception;

    /*判断是否存在
     * */
    String KnowExit(String assetId) throws Exception;

    /*删除资产*/
    String DeleteAsset(String assetId) throws Exception;

    /*资产交易*/
    /*转让 Tomoko > owner Tom
     * */
    String TransferAsset(String assetId, String buyer) throws Exception;

    /*富查询
     *  Rich Query with Pagination (Only supported if CouchDB is used as state database
     *  */
    void RichQuery() throws Exception;

    /*部分资产转移 感觉这个用的会比较多
     * */
    void PartAsset(String parm, String owner) throws Exception;

    /*还是部分用户的富查询
     * */
    void QueryAssetsByOwner(String owner) throws Exception;

    /*历史数据获取
     * */
    String GetHistoryData(String assetId) throws Exception;

    /*
     * 分页查询
     * */
    void PagingQuery() throws Exception;

    /*富查询的某一种*/
    void RichQueryOne() throws Exception;

    /*一定范围中的查询
     * */
    void QueryPaging() throws Exception;

    /*owner查询*/
    String QueryAssetByOwner(String id) throws Exception;

    //    查询String
    String getQueryResultForQueryString(String owner) throws Exception;

    /**
     * 证书生成
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    String becomeCertificate(FabricUser fabricUser) throws Exception;

    /**
     *
     * 查看全部设备数据列表
     * @Author chenjinbin
     * @Value
     * @Title
     */
    String QueryAllDeviceData() throws Exception;
}
